<ui:composition 
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:c="http://java.sun.com/jsp/jstl/core"
    xmlns:ds="http://deltaset.org/deltaset-faces"
    xmlns:composite="http://java.sun.com/jsf/composite">
    <composite:interface
        name="uploadComponent"
        componentType="compositeFileUpload">
        <composite:attribute name="value"/>       
        <composite:attribute name="formId"/>
        <composite:attribute name="label"/>
    </composite:interface>

    <composite:implementation> 
        <h:outputLabel value="#{cc.attrs.label}:" rendered="#{not empty cc.attrs.label}" styleClass="ds-label"/>
        <h:panelGroup id="text" layout="block">
            <c:if test="#{not empty cc.attrs.label}">
                <f:attribute name="styleClass" value="ds-field"/>
            </c:if>
            <ds:downloadFile value="#{cc.attrs.value}" rendered="#{not empty cc.attrs.value}"/>
            <div>#{cc.attrs.value.contentType}</div>
            <div>#{cc.attrs.value.fileSize/1000}Kb</div>
            <c:if test="#{not empty cc.attrs.label}">
                <ds:image value="#{cc.attrs.value}"/>
            </c:if>
        </h:panelGroup>
    </composite:implementation>    
</ui:composition>